package 结构型模式.适配器;

/**
 * @ClassNameClassAdapterTest
 * @Description
 * @Author
 * @Date2021/12/14 17:13
 **/
public class ClassAdapterTest {
    public static void main(String[] args) {
        Adaptor adaptor = new Adaptor();
        adaptor.request();
    }
}

interface Target{
    void request();
}

class Adaptee{
    public void specialRequest(){
        System.out.println("适配器被调用");
    }
}

class Adaptor extends Adaptee implements Target{

    @Override
    public void request() {
        specialRequest();
    }
}
